import { Injectable } from '@angular/core';
import { HttpHeaders } from '@angular/common/http';

@Injectable({
  providedIn: 'root',
})
export class HttpHeaderService {

constructor() { }

getDefaultHeaders(): HttpHeaders {
  const token = localStorage.getItem('h-token') || '';
    return new HttpHeaders({
      'h-token': token ? token:`Bearer ${token}`, // 你的授权 token
      'terminal': 'h5'        // 自定义 header
    });
  }
}
